<!--
/**
 * @file DBXml.html
 * @author Alejandro Dario Simi
 * @date $Date: 2013-04-29 01:12:58 +0000 (Mon, 29 Apr 2013) $
 *
 * $Id: DBXml.html 62 2013-04-29 01:12:58Z daemonraco@gmail.com $
 * $URL: http://wcomix.googlecode.com/svn/tags/wcomix-1.0-BETA1/docs/DBXml.html $
 */
-->
<html>
	<head>
		<title>Database XML Specs</title>
		<script type="text/javascript" src="jquery-1.8.0.min.js"></script>

		<script type="text/javascript" src="SyntaxHighlighter/scripts/shCore.js"></script>
		<link type="text/css" rel="stylesheet" href="SyntaxHighlighter/styles/shCoreEclipse.css"/>
		<link type="text/css" rel="stylesheet" href="SyntaxHighlighter/styles/shThemeEclipse.css"/>
		<script type="text/javascript">SyntaxHighlighter.all();</script>

		<link rel="stylesheet" type="text/css" href="docs.css"/>
		<script type="text/javascript" src="docs.js"></script>
	</head>
	<body>
		<div class="Section">
			<span class="Title">Table Of Contents</span>
			<div class="TableOfContents"></div>
		</div>
		<div class="Section">
			<span class="Title">XML System</span>
			<div class="Paragraph">
				<p>wcomix has an internal way to manage database specifications based on XML file. Instead of having a bunch of
				queries to run on installation, it holds a bunch of XML files and through them it creates the appropiate query for each databse item and executes it.</p>
				<p>This mechanism allow wcomix to mantain and upgrade the database strucutre without having a bunch of queries to create the database from scratch and another bunch to upgrade each version combiantion.</p>
			</div>
		</div>
		<div class="Section">
			<span class="Title">Specs XML's specs</span>
			<div class="Paragraph">
				<p>Each XML must validated agaist a DTD file provided by xcomix which looks like this:</p>
				<pre class="brush: dtd;" title="Comments have been remove from the original DTD file.">&lt;!ELEMENT table	(name,comment,columns)&gt;
&lt;!ELEMENT index	(name,tablename,columns,non_unique?)&gt;

&lt;!ELEMENT columns	((column|columnname)+)&gt;

&lt;!ELEMENT column	(name,position,default?,null,column_type,column_comment)&gt;

&lt;!ELEMENT columnname	(#PCDATA)&gt;
&lt;!ELEMENT name		(#PCDATA)&gt;
&lt;!ELEMENT comment	(#PCDATA)&gt;
&lt;!ELEMENT position	(#PCDATA)&gt;
&lt;!ELEMENT default	(#PCDATA)&gt;
&lt;!ELEMENT null		(#PCDATA)&gt;
&lt;!ELEMENT column_type	(#PCDATA)&gt;
&lt;!ELEMENT column_comment	(#PCDATA)&gt;

&lt;!ELEMENT non_unique	EMPTY&gt;</pre>
			</div>
		</div>
	</body>
</html>
